<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>php.ini 核心配置选项说明</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="ini.sections.html">« php.ini 配置段列表</a></li>
      <li style="float: right;"><a href="extensions.html">扩展库列表／归类 »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ini.html">php.ini 配置</a></li>
    <li>php.ini 核心配置选项说明</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="ini.core" class="section">
  <h2 class="title"><var class="filename">php.ini</var> 核心配置选项说明</h2>
  <p class="para">
   该列表只包含核心的 <var class="filename">php.ini</var>
   配置选项。扩展的配置选项在各个扩展的文档页面分别被描述。比如，有关 session 的选项可以在
   <a href="session.configuration.html" class="link">sessions 页面</a>找到。
  </p>
  <blockquote class="note"><p><strong class="note">注意</strong>: 
   <p class="para">
    以下列出了未设置 <var class="filename">php.ini</var> 时的默认值；开发环境和生产环境的 <var class="filename">php.ini</var> 值可能会有所不同。
   </p>
  </p></blockquote>
  
  <div class="section" id="ini.sect.language-options">
   <h2 class="title">语言选项</h2>
   <p class="para">
    <table class="doctable table">
     <caption><strong>语言和杂类配置选项</strong></caption>
     
      <thead>
       <tr>
        <th>名字</th>
        <th>默认</th>
        <th>可修改范围</th>
        <th>更新日志</th>
       </tr>

      </thead>

      <tbody class="tbody">
       <tr>
        <td><a href="ini.core.html#ini.short-open-tag" class="link">short_open_tag</a></td>
        <td>&quot;1&quot;</td>
        <td>PHP_INI_PERDIR</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.precision" class="link">precision</a></td>
        <td>&quot;14&quot;</td>
        <td>PHP_INI_ALL</td>
        <td class="empty">&nbsp;</td>
       </tr>

       
       <tr>
        <td><a href="ini.core.html#ini.serialize-precision" class="link">serialize_precision</a></td>
        <td>&quot;-1&quot;</td>
        <td>PHP_INI_ALL</td>
        <td>
        在 PHP 7.1.0 以前，默认值为 17。
        </td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.disable-functions" class="link">disable_functions</a></td>
        <td>&quot;&quot;</td>
        <td>仅仅为 PHP_INI_SYSTEM</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.disable-classes" class="link">disable_classes</a></td>
        <td>&quot;&quot;</td>
        <td>仅仅为 <var class="filename">php.ini</var> </td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.exit-on-timeout" class="link">exit_on_timeout</a></td>
        <td>&quot;&quot;</td>
        <td>PHP_INI_ALL</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.expose-php" class="link">expose_php</a></td>
        <td>&quot;1&quot;</td>
        <td><var class="filename">php.ini</var> only</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.hard-timeout" class="link">hard_timeout</a></td>
        <td>&quot;2&quot;</td>
        <td>PHP_INI_SYSTEM</td>
        <td>从 PHP 7.1.0 起可用</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.zend.exception-ignore-args" class="link">zend.exception_ignore_args</a></td>
        <td>&quot;0&quot;</td>
        <td>PHP_INI_ALL</td>
        <td>从 PHP 7.4.0 起可用</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.zend.multibyte" class="link">zend.multibyte</a></td>
        <td>&quot;0&quot;</td>
        <td>PHP_INI_ALL</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.zend.script-encoding" class="link">zend.script_encoding</a></td>
        <td>NULL</td>
        <td>PHP_INI_ALL</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.zend.detect-unicode" class="link">zend.detect-unicode</a></td>
        <td>NULL</td>
        <td>PHP_INI_ALL</td>
        <td>从 PHP 5.4.0 起可用</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.zend.signal-check" class="link">zend.signal_check</a></td>
        <td>&quot;0&quot;</td>
        <td>PHP_INI_SYSTEM</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.zend.assertions" class="link">zend.assertions</a></td>
        <td>&quot;1&quot;</td>
        <td>PHP_INI_ALL</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.zend.exception-string-param-max-len" class="link">zend.exception_string_param_max_len</a></td>
        <td>&quot;15&quot;</td>
        <td>PHP_INI_ALL</td>
        <td>自 PHP 8.0.0 起可用。</td>
       </tr>

      </tbody>
     
    </table>

   </p>
   
   <p class="para">这是配置指令的简短说明。</p>
   
   <p class="para">
    <dl>
     
      <dt id="ini.short-open-tag">
       <code class="parameter">short_open_tag</code>
       <span class="type">bool</span>
      </dt>

      <dd>

       <p class="para">
         决定是否允许使用 PHP 代码开始标志的缩写形式（<strong class="userinput"><code>&lt;?
         ?&gt;</code></strong>）。如果要和 XML 结合使用
         PHP，可以禁用此选项以便于嵌入使用
         <strong class="userinput"><code>&lt;?xml ?&gt;</code></strong>。否则还可以通过
         PHP 来输出，例如：<strong class="userinput"><code>&lt;?php echo &#039;&lt;?xml
         version=&quot;1.0&quot;&#039;; ?&gt;</code></strong>。如果禁用了，必须使用
         PHP 代码开始标志的完整形式（<strong class="userinput"><code>&lt;?php
         ?&gt;</code></strong>）。
       </p>
       <blockquote class="note"><p><strong class="note">注意</strong>: 
        <p class="para">
          本指令不会影响到缩写形式
          <strong class="userinput"><code>&lt;?=</code></strong>，因为它总是可用的。
        </p>
       </p></blockquote>
      </dd>

     
     
     
      <dt id="ini.precision">
       <code class="parameter">precision</code>
       <span class="type">int</span>
      </dt>

      <dd>

       <span class="simpara">
        浮点数中显示有效数字的位数。<code class="literal">-1</code> means that an enhanced algorithm for rounding 
        such numbers will be used.
       </span>
      </dd>

     

     
      <dt id="ini.serialize-precision">
       <code class="parameter">serialize_precision</code>
       <span class="type">int</span>
      </dt>

      <dd>

       <span class="simpara">
        The number of significant digits stored while serializing floating point numbers.
        <code class="literal">-1</code> means that an enhanced algorithm for rounding 
        such numbers will be used.
       </span>
      </dd>

     
     
     
      <dt id="ini.expose-php">
       <code class="parameter">expose_php</code>
       <span class="type">bool</span>
      </dt>

      <dd>

       <p class="para">
        决定是否暴露 PHP 被安装在服务器上（例如在 Web
        服务器的信息头中加上其签名：X-Powered-By: PHP/5.3.7)。
       </p>
      </dd>

     
     
    








    
     <dt id="ini.disable-functions">
      <code class="parameter">disable_functions</code>
      <span class="type">string</span>
     </dt>

     <dd>

      <p class="para">
       本指令可用于禁止某些函数。接受逗号分隔的函数名列表作为参数。
      </p>
       <p class="para">
        此指令仅能禁用 <a href="functions.internal.html" class="link">内置函数</a>。
        不能影响<a href="functions.user-defined.html" class="link">用户自定义函数</a>。
      </p>
      <p class="para">
       本指令只能设置在 <var class="filename">php.ini</var> 中。例如，无法在 <var class="filename">httpd.conf</var> 中设置。
      </p>
     </dd>

    
     
    


    
     <dt id="ini.disable-classes">
      <code class="parameter">disable_classes</code>
      <span class="type">string</span>
     </dt>

     <dd>

      <span class="simpara">
       本指令可以使你禁用某些类。用逗号分隔类名。
      </span>
      <span class="simpara">
       本指令只能设置在 <var class="filename">php.ini</var> 中。例如不能将其设置在 <var class="filename">httpd.conf</var>。
      </span>
     </dd>

    
     
     

     
      <dt id="ini.zend.assertions">
       <code class="parameter">zend.assertions</code>
       <span class="type">int</span>
      </dt>

      <dd>

       <span class="simpara">
        When set to <code class="literal">1</code>, assertion code will be generated and
        executed (development mode). When set to <code class="literal">0</code>,
        assertion code will be generated but it will be skipped (not executed)
        at runtime. When set to <code class="literal">-1</code>, assertion code will not
        be generated, making the assetions zero-cost (production mode).
       </span>
       <blockquote class="note"><p><strong class="note">注意</strong>: 
        <p class="para">
         If a process is started in production mode, <a href="ini.core.html#ini.zend.assertions" class="link">zend.assertions</a>
         cannot be changed at runtime, since the code for assertions was not generated.
        </p>
        <p class="para">
         If a process is started in development mode, <a href="ini.core.html#ini.zend.assertions" class="link">zend.assertions</a>
         cannot be set to <code class="literal">-1</code> at runtime.
        </p>
       </p></blockquote>
      </dd>

     

     
      <dt id="ini.zend.exception-string-param-max-len">
       <code class="parameter">zend.exception_string_param_max_len</code>
       <span class="type">int</span>
      </dt>

      <dd>

       <span class="simpara">
        The maximum length of string function arguments in stringified stack traces.
        Must range between <code class="literal">&quot;0&quot;</code> and <code class="literal">&quot;1000000&quot;</code>.
       </span>
      </dd>

     
     
     
      <dt id="ini.hard-timeout">
       <code class="parameter">hard_timeout</code>
       <span class="type">int</span>
      </dt>

      <dd>

       <p class="para">
        When the timeout set in <a href="info.configuration.html#ini.max-execution-time" class="link">max_execution_time</a>
        has been hit, the PHP runtime will tear down resources gracefully. If
        something gets stuck while this happens, the hard timeout will tick
        for the set amount of seconds. When the hard timeout is hit, PHP will
        exit ungracefully. When set to 0, the hard timeout will never activate.
       </p>
       <p class="para">
        When PHP stops from a hard timeout, it will look something like this:
        <div class="example-contents screen">
<div class="cdata"><pre>
Fatal error: Maximum execution time of 30+2 seconds exceeded (terminated) in Unknown on line 0
</pre></div>
        </div>
       </p>
      </dd>

     
     
     
      <dt id="ini.zend.exception-ignore-args">
       <code class="parameter">zend.exception_ignore_args</code>
       <span class="type">bool</span>
      </dt>

      <dd>

       <p class="para">
        从异常产生的堆栈中排除参数。
       </p>
      </dd>

     
     
     
      <dt id="ini.zend.multibyte">
       <code class="parameter">zend.multibyte</code>
       <span class="type">bool</span>
      </dt>

      <dd>

       <p class="para">
        启用多字节编码的源文件解析功能。启用
        zend.multibyte 是使用 SJIS、BIG5 等在多字节字符串数据中包含特殊字符的字符编码所必需的。ISO-8859-1
        兼容的编码，如 UTF-8、EUC 等，则不需要这个选项。
       </p>
       <p class="para">
        启用 zend.multibyte 需要 mbstring 扩展可用。
       </p>
      </dd>

     
     
     
     
      <dt id="ini.zend.script-encoding">
       <code class="parameter">zend.script_encoding</code>
       <span class="type">string</span>
      </dt>

      <dd>

       <p class="para">
        除非在脚本顶部出现 <a href="control-structures.declare.html#control-structures.declare.encoding" class="link">declare(encoding=...)</a>
        指令，否则将会使用此值。当使用不兼容 ISO-8859-1 的编码时，必须同时使用 zend.multibyte 和 zend.script_encoding。
       </p>
       <p class="para">
        文字字符串将从 zend.script_encoding 直译为 mbstring.internal_encoding，就像调用了
        <span class="function"><a href="function.mb-convert-encoding.html" class="function">mb_convert_encoding()</a></span> 一样。
       </p>
      </dd>

     

     
      <dt id="ini.zend.detect-unicode">
       <code class="parameter">zend.detect_unicode</code>
       <span class="type">bool</span>
      </dt>

      <dd>

       <p class="para">
        Check for BOM (Byte Order Mark) and see if the file contains valid
        multibyte characters.
        This detection is performed before processing of
        <span class="function"><a href="function.halt-compiler.html" class="function">__halt_compiler()</a></span>.
        Available only in Zend Multibyte mode.
       </p>
      </dd>

     
     
     
      <dt id="ini.zend.signal-check">
       <code class="parameter">zend.signal_check</code>
       <span class="type">bool</span>
      </dt>

      <dd>

       <p class="para">
        To check for replaced signal handlers on shutdown.
       </p>
      </dd>

     
     
     
      <dt id="ini.exit-on-timeout">
       <code class="parameter">exit_on_timeout</code>
       <span class="type">bool</span>
      </dt>

      <dd>

       <p class="para">
        这是一个用于 Apache 1 的 mod_php-only 指令，如果 PHP 执行超时，会强制 Apache 子程序退出.这样的超时会导致
        Apache 1 内部的 longjmp() 调用，从而使一些扩展处于不一致的状态。通过终止进程，任何未完成的锁或内存将被清理。
       </p>
      </dd>

     
     
    </dl>

   </p>
  </div>
  
  <div class="section" id="ini.sect.resource-limits">
   <h2 class="title">资源限制</h2>
   <p class="para">
    <table class="doctable table">
     <caption><strong>资源限制</strong></caption>
     
      <thead>
       <tr>
        <th>名字</th>
        <th>默认</th>
        <th>可修改范围</th>
        <th>更新日志</th>
       </tr>

      </thead>

      <tbody class="tbody">
       <tr>
        <td><a href="ini.core.html#ini.memory-limit" class="link">memory_limit</a></td>
        <td>&quot;128M&quot;</td>
        <td>PHP_INI_ALL</td>
        <td class="empty">&nbsp;</td>
       </tr>

      </tbody>
     
    </table>

   </p>
   
   <p class="para">这是配置指令的简短说明。</p>
   
   <p class="para">
    <dl>
     
      <dt id="ini.memory-limit">
       <code class="parameter">memory_limit</code>
       <span class="type">int</span>
      </dt>

      <dd>

       <p class="para">
        设置了一个脚本允许分配的最大内存量，以字节（bytes）为单位。这有助于防止写得不好的脚本吃掉服务器上所有可用的内存。请注意，如果不需要内存限制，请将此指令设置为
        <code class="literal">-1</code>。
       </p>
       
       <span class="simpara">当使用 <span class="type">int</span>
时, 其值以字节来衡量。还可以使用在 <a href="faq.using.html#faq.using.shorthandbytes" class="link">FAQ</a> 中描述的速记符。</span>
       
      </dd>

     
    </dl>

   </p>
   



   <p class="para">
    请参阅：<a href="info.configuration.html#ini.max-execution-time" class="link">max_execution_time</a>。
   </p>
  </div>
  
  <div class="section" id="ini.sect.performance">
   <h2 class="title">性能调整</h2>
   <p class="para">
    <table class="doctable table">
     <caption><strong>性能调整</strong></caption>
     
      <thead>
       <tr>
        <th>名字</th>
        <th>默认</th>
        <th>可修改范围</th>
        <th>更新日志</th>
       </tr>

      </thead>

      <tbody class="tbody">
       <tr>
        <td><a href="ini.core.html#ini.realpath-cache-size" class="link">realpath_cache_size</a></td>
        <td>&quot;4M&quot;</td>
        <td>PHP_INI_SYSTEM</td>
        <td>PPHP 7.0.16 和 7.1.2 之前，默认值为 <code class="literal">&quot;16K&quot;</code></td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.realpath-cache-ttl" class="link">realpath_cache_ttl</a></td>
        <td>&quot;120&quot;</td>
        <td>PHP_INI_SYSTEM</td>
        <td class="empty">&nbsp;</td>
       </tr>

      </tbody>
     
    </table>

    <blockquote class="note"><p><strong class="note">注意</strong>: 
     <p class="para">
      启用 <a href="ini.core.html#ini.open-basedir" class="link">open_basedir</a> 将会
      <em class="emphasis">禁用</em> realpath cache。
     </p>
    </p></blockquote>
   </p>
   <p class="para">这是配置指令的简短说明。</p>
   <p class="para">
    <dl>
     
      <dt id="ini.realpath-cache-size">
       <code class="parameter">realpath_cache_size</code>
       <span class="type">int</span>
      </dt>

      <dd>

       <p class="para">
        设定 PHP 使用的 realpath 缓存的大小。在
        PHP 打开很多文件的系统中，这个值应该增加，以优化文件操作的数量。
       </p>
       <p class="para">
        这里的大小表示存储的路径字符串的总字节数，加上与缓存条目相关的数据大小。这意味着，为了在缓存中存储更长的路径，缓存大小必须更大。这个值不直接控制可以缓存的不同路径的数量。
       </p>
       <p class="para">
        缓存输入数据所需的大小取决于操作系统。
       </p>
      </dd>

     
     
      <dt id="ini.realpath-cache-ttl">
       <code class="parameter">realpath_cache_ttl</code>
       <span class="type">integer</span>
      </dt>

      <dd>

       <p class="para">
        缓存给定文件或目录的真实路径信息的持续时间（以秒为单位）。对于很少改变文件的系统，可以考虑增加该值。
       </p>
      </dd>

     
    </dl>

   </p>
  </div>
  
  






  <div class="section" id="ini.sect.data-handling">
   <h2 class="title">数据处理</h2>
   <p class="para">
    <table class="doctable table">
     <caption><strong>数据处理配置选项</strong></caption>
     
      <thead>
       <tr>
        <th>名字</th>
        <th>默认</th>
        <th>可修改范围</th>
        <th>更新日志</th>
       </tr>

      </thead>

      <tbody class="tbody">
       <tr>
        <td><a href="ini.core.html#ini.arg-separator.output" class="link">arg_separator.output</a></td>
        <td>&quot;&amp;&quot;</td>
        <td>PHP_INI_ALL</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.arg-separator.input" class="link">arg_separator.input</a></td>
        <td>&quot;&amp;&quot;</td>
        <td>PHP_INI_PERDIR</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.variables-order" class="link">variables_order</a></td>
        <td>&quot;EGPCS&quot;</td>
        <td>PHP_INI_PERDIR</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.request-order" class="link">request_order</a></td>
        <td>&quot;&quot;</td>
        <td>PHP_INI_PERDIR</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.auto-globals-jit" class="link">auto_globals_jit</a></td>
        <td>&quot;1&quot;</td>
        <td>PHP_INI_PERDIR</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.register-argc-argv" class="link">register_argc_argv</a></td>
        <td>&quot;1&quot;</td>
        <td>PHP_INI_PERDIR</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.enable-post-data-reading" class="link">enable_post_data_reading</a></td>
        <td>&quot;1&quot;</td>
        <td>PHP_INI_PERDIR</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.post-max-size" class="link">post_max_size</a></td>
        <td>&quot;8M&quot;</td>
        <td>PHP_INI_PERDIR</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.auto-prepend-file" class="link">auto_prepend_file</a></td>
        <td>NULL</td>
        <td>PHP_INI_PERDIR</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.auto-append-file" class="link">auto_append_file</a></td>
        <td>NULL</td>
        <td>PHP_INI_PERDIR</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.default-mimetype" class="link">default_mimetype</a></td>
        <td>&quot;text/html&quot;</td>
        <td>PHP_INI_ALL</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.default-charset" class="link">default_charset</a></td>
        <td>&quot;UTF-8&quot;</td>
        <td>PHP_INI_ALL</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.input-encoding" class="link">input_encoding</a></td>
        <td>&quot;&quot;</td>
        <td>PHP_INI_ALL</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.output-encoding" class="link">output_encoding</a></td>
        <td>&quot;&quot;</td>
        <td>PHP_INI_ALL</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.internal-encoding" class="link">internal_encoding</a></td>
        <td>&quot;&quot;</td>
        <td>PHP_INI_ALL</td>
        <td class="empty">&nbsp;</td>
       </tr>

      </tbody>
     
    </table>

   </p>
   
   <p class="para">这是配置指令的简短说明。</p>
   
   <p class="para">
    <dl>
     
      <dt id="ini.arg-separator.output">
       <code class="parameter">arg_separator.output</code>
       <span class="type">string</span>
      </dt>

      <dd>

       <p class="para">
        在 PHP 生成的 URL 中用来分隔参数的分隔符。
       </p>
      </dd>

     
     
     
      <dt id="ini.arg-separator.input">
       <code class="parameter">arg_separator.input</code>
       <span class="type">string</span>
      </dt>

      <dd>

       <p class="para">
        PHP 用于将输入的 URL 解析为变量的分隔符列表。
       </p>
       <blockquote class="note"><p><strong class="note">注意</strong>: 
        <p class="para">
         本指令中的每一个字符都被视为分隔符！
        </p>
       </p></blockquote>
      </dd>

     
     
     
      <dt id="ini.variables-order">
       <code class="parameter">variables_order</code>
       <span class="type">string</span>
      </dt>

      <dd>

       <p class="para">
        Sets the order of the EGPCS (<code class="literal">E</code>nvironment,
        <code class="literal">G</code>et, <code class="literal">P</code>ost,
        <code class="literal">C</code>ookie, and <code class="literal">S</code>erver) variable
        parsing. For example, if variables_order
        is set to <code class="literal">&quot;SP&quot;</code> then PHP will create the
        <a href="language.variables.predefined.html" class="link">superglobals</a> <var class="varname"><a href="reserved.variables.server.html" class="classname">$_SERVER</a></var> and
        <var class="varname"><a href="reserved.variables.post.html" class="classname">$_POST</a></var>, but not create
        <var class="varname"><a href="reserved.variables.environment.html" class="classname">$_ENV</a></var>, <var class="varname"><a href="reserved.variables.get.html" class="classname">$_GET</a></var>, and
        <var class="varname"><a href="reserved.variables.cookies.html" class="classname">$_COOKIE</a></var>.  Setting to &quot;&quot; means no
        <a href="language.variables.predefined.html" class="link">superglobals</a> will be set.
       </p>
       <div class="warning"><strong class="warning">警告</strong>
        <p class="para">
         In both the CGI and FastCGI SAPIs,
         <var class="varname"><a href="reserved.variables.server.html" class="classname">$_SERVER</a></var> is
         also populated by values from the environment; <code class="literal">S</code>
         is always equivalent to <code class="literal">ES</code> regardless of the
         placement of <code class="literal">E</code> elsewhere in this directive.
        </p>
       </div>
       <blockquote class="note"><p><strong class="note">注意</strong>: 
        <p class="para">
         The content and order of
         <var class="varname"><a href="reserved.variables.request.html" class="classname">$_REQUEST</a></var> is also
         affected by this directive.
        </p>
       </p></blockquote>
      </dd>

     
     
     
      <dt id="ini.request-order">
       <code class="parameter">request_order</code>
       <span class="type">string</span>
      </dt>

      <dd>

       <p class="para">
        This directive describes the order in which PHP registers GET, POST
        and Cookie variables into the _REQUEST array. Registration is done
        from left to right, newer values override older values.
       </p>
       <p class="para">
        If this directive is not set, <a href="ini.core.html#ini.variables-order" class="link">variables_order</a> is used for
        <var class="varname"><a href="reserved.variables.request.html" class="classname">$_REQUEST</a></var> contents.
       </p>
       <p class="para">
        Note that the default distribution <var class="filename">php.ini</var> files does not contain 
        the <code class="literal">&#039;C&#039;</code> for cookies, due to security concerns.
       </p>
      </dd>

     
     
     
      <dt id="ini.auto-globals-jit">
       <code class="parameter">auto_globals_jit</code>
       <span class="type">bool</span>
      </dt>

      <dd>

       <p class="para">
        When enabled, the SERVER, REQUEST, and ENV variables are created when they&#039;re
        first used (Just In Time) instead of when the script starts. If these
        variables are not used within a script, having this directive on will
        result in a performance gain.
       </p>
       <div class="warning"><strong class="warning">警告</strong>
        <p class="para">
         Usage of SERVER, REQUEST, and ENV variables is checked during the compile time
         so using them through e.g. <a href="language.variables.variable.html" class="link">variable variables</a> will
         not cause their initialization.
        </p>
       </div>
      </dd>

     

     
     
      <dt id="ini.register-argc-argv">
       <code class="parameter">register_argc_argv</code>
       <span class="type">bool</span>
      </dt>

      <dd>

       <span class="simpara">
        Tells PHP whether to declare the argv &amp; argc variables
        (that would contain the GET information).
       </span>
       <span class="simpara">
        See also <a href="features.commandline.html" class="link">command line</a>.
       </span>
      </dd>

     
     
     
      <dt id="ini.enable-post-data-reading">
       <code class="parameter">enable_post_data_reading</code>
       <span class="type">bool</span>
      </dt>

      <dd>

       <span class="simpara">
        Disabling this option causes <var class="varname"><a href="reserved.variables.post.html" class="classname">$_POST</a></var> and
        <var class="varname"><a href="reserved.variables.files.html" class="classname">$_FILES</a></var> <em class="emphasis">not</em> to be populated.
        The only way to read postdata will then be through the
        <a href="wrappers.php.html" class="link">php://input</a> stream wrapper.
        This can be useful to proxy requests or to process
        the POST data in a memory efficient fashion.
       </span>
      </dd>

     

     
      <dt id="ini.post-max-size">
       <code class="parameter">post_max_size</code>
       <span class="type">int</span>
      </dt>

      <dd>

       <span class="simpara">
        Sets max size of post data allowed. This setting also affects
        file upload. To upload large files, this value must be larger
        than <a href="ini.core.html#ini.upload-max-filesize" class="link">upload_max_filesize</a>.
       </span>
       <span class="simpara">
        Generally speaking,
        <a href="ini.core.html#ini.memory-limit" class="link">memory_limit</a> should be
        larger than <code class="parameter">post_max_size</code>.
       </span>
       
       <span class="simpara">当使用 <span class="type">int</span>
时, 其值以字节来衡量。还可以使用在 <a href="faq.using.html#faq.using.shorthandbytes" class="link">FAQ</a> 中描述的速记符。</span>
       
       <span class="simpara">
        If the size of post data is greater than post_max_size, the
        <var class="varname"><a href="reserved.variables.post.html" class="classname">$_POST</a></var> and <var class="varname"><a href="reserved.variables.files.html" class="classname">$_FILES</a></var>
        <a href="language.variables.superglobals.html" class="link">superglobals</a>
        are empty. This can be tracked in various ways, e.g. by passing the
        <var class="varname"><a href="reserved.variables.get.html" class="classname">$_GET</a></var> variable to the script processing the data,
        i.e. <code class="literal">&lt;form action=&quot;edit.php?processed=1&quot;&gt;</code>,
        and then checking if <var class="varname"><a href="reserved.variables.get.html" class="classname">$_GET['processed']</a></var> is set.
       </span>
       <p class="para">
        <blockquote class="note"><p><strong class="note">注意</strong>: 
         <p class="para">
          PHP allows shortcuts for byte values, including K (kilo), M (mega) 
          and G (giga). PHP will do the conversions automatically if you 
          use any of these. Be careful not to exceed the 32 bit signed integer 
          limit (if you&#039;re using 32bit versions) as it will cause your script 
          to fail.
         </p>
        </p></blockquote>
       </p>
       <p class="para">
        <table class="doctable table">
         <caption><strong>Changelog for <code class="literal">post_max_size</code></strong></caption>
         
          <thead>
           <tr>
            <th>版本</th>
            <th>说明</th>
           </tr>

          </thead>

          <tbody class="tbody">
           <tr>
            <td>5.3.4</td>
            <td>
             <code class="parameter">post_max_size</code> = 0 will not disable the limit when the content
             type is application/x-www-form-urlencoded or is not registered with PHP.
            </td>
           </tr>

           <tr>
            <td>5.3.2 , 5.2.12</td>
            <td>
             Allow unlimited post size by setting <code class="parameter">post_max_size</code> to 0.
            </td>
           </tr>

          </tbody>
         
        </table>

       </p>
      </dd>

     

     
      <dt id="ini.auto-prepend-file">
       <code class="parameter">auto_prepend_file</code>
       <span class="type">string</span>
      </dt>

      <dd>

       <p class="para">
        Specifies the name of a file that is automatically parsed
        before the main file.  The file is included as if it was
        called with the <span class="function"><a href="function.require.html" class="function">require</a></span> function, so
        <a href="ini.core.html#ini.include-path" class="link">include_path</a> is used.</p>
       <p class="para">
        The special value <code class="literal">none</code>
        disables auto-prepending.
       </p>
      </dd>

     
     
     
      <dt id="ini.auto-append-file">
       <code class="parameter">auto_append_file</code>
       <span class="type">string</span>
      </dt>

      <dd>

       <p class="para">
        Specifies the name of a file that is automatically parsed
        after the main file.  The file is included as if it was
        called with the <span class="function"><a href="function.require.html" class="function">require</a></span> function, so
        <a href="ini.core.html#ini.include-path" class="link">include_path</a> is used.</p>
       <p class="para">
        The special value <code class="literal">none</code>
        disables auto-appending.
        <blockquote class="note"><p><strong class="note">注意</strong>: 
         <span class="simpara">
          If the script is terminated with <span class="function"><a href="function.exit.html" class="function">exit()</a></span>,
          auto-append will <em class="emphasis">not</em> occur.</span>
        </p></blockquote>
       </p>
      </dd>

     
     
     
      <dt id="ini.default-mimetype">
       <code class="parameter">default_mimetype</code>
       <span class="type">string</span>
      </dt>

      <dd>

       <p class="para">
        By default, PHP will output a media type using the Content-Type header.
        To disable this, simply set it to be empty.
       </p>
       <p class="para">
        PHP&#039;s built-in default media type is set to text/html.
       </p>
      </dd>

     
     
     
      <dt id="ini.default-charset">
       <code class="parameter">default_charset</code>
       <span class="type">string</span>
      </dt>

      <dd>

       <p class="para">
        &quot;UTF-8&quot; is the default value and its value is used
        as the default character encoding for
        <span class="function"><a href="function.htmlentities.html" class="function">htmlentities()</a></span>,
        <span class="function"><a href="function.html-entity-decode.html" class="function">html_entity_decode()</a></span> and
        <span class="function"><a href="function.htmlspecialchars.html" class="function">htmlspecialchars()</a></span> if the
        <code class="parameter">encoding</code> parameter is omitted. The value of
        <code class="parameter">default_charset</code> will also be used to set the
        default character set for <a href="book.iconv.html" class="link">iconv</a>
        functions if the
        <a href="iconv.configuration.html#ini.iconv.input-encoding" class="link"><code class="parameter">iconv.input_encoding</code></a>,
        <a href="iconv.configuration.html#ini.iconv.output-encoding" class="link"><code class="parameter">iconv.output_encoding</code></a> and
        <a href="iconv.configuration.html#ini.iconv.internal-encoding" class="link"><code class="parameter">iconv.internal_encoding</code></a>
        configuration options are unset, and for
        <a href="book.mbstring.html" class="link">mbstring</a> functions if the
        <a href="mbstring.configuration.html#ini.mbstring.http-input" class="link"><code class="parameter">mbstring.http_input</code></a>
        <a href="mbstring.configuration.html#ini.mbstring.http-output" class="link"><code class="parameter">mbstring.http_output</code></a>
        <a href="mbstring.configuration.html#ini.mbstring.internal-encoding" class="link"><code class="parameter">mbstring.internal_encoding</code></a>
        configuration option is unset.
       </p>
       <p class="para">
        All versions of PHP will use this value as the charset within the
        default Content-Type header sent by PHP if the header isn&#039;t overridden
        by a call to <span class="function"><a href="function.header.html" class="function">header()</a></span>.
       </p>
       <p class="para">
        Setting <code class="parameter">default_charset</code> to an empty value is
        not recommended.
       </p>
      </dd>

     
     
     
      <dt id="ini.input-encoding">
       <code class="parameter">input_encoding</code>
       <span class="type">string</span>
      </dt>

      <dd>

       <p class="para">
        This setting is used for multibyte modules
        such as mbstring and iconv. Default is empty.
       </p>
      </dd>

     
     
     
      <dt id="ini.output-encoding">
       <code class="parameter">output_encoding</code>
       <span class="type">string</span>
      </dt>

      <dd>

       <p class="para">
        This setting is used for multibyte modules
        such as mbstring and iconv. Default is empty.
       </p>
      </dd>

     
      
     
      <dt id="ini.internal-encoding">
       <code class="parameter">internal_encoding</code>
       <span class="type">string</span>
      </dt>

      <dd>

       <p class="para">
        This setting is used for multibyte modules
        such as mbstring and iconv. Default is empty. If empty,
        <a href="ini.core.html#ini.default-charset" class="link">default_charset</a> is used.
       </p>
      </dd>

     

     
    </dl>

   </p>
  </div>
  
  <div class="section" id="ini.sect.path-directory">
   <h2 class="title">Paths and Directories</h2>
   <p class="para">
    <table class="doctable table">
     <caption><strong>Paths and Directories Configuration Options</strong></caption>
     
      <thead>
       <tr>
        <th>名字</th>
        <th>默认</th>
        <th>可修改范围</th>
        <th>更新日志</th>
       </tr>

      </thead>

      <tbody class="tbody">
       <tr>
        <td><a href="ini.core.html#ini.include-path" class="link">include_path</a></td>
        <td>&quot;.;/path/to/php/pear&quot;</td>
        <td>PHP_INI_ALL</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.open-basedir" class="link">open_basedir</a></td>
        <td>NULL</td>
        <td>PHP_INI_ALL</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.doc-root" class="link">doc_root</a></td>
        <td>NULL</td>
        <td>PHP_INI_SYSTEM</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.user-dir" class="link">user_dir</a></td>
        <td>NULL</td>
        <td>PHP_INI_SYSTEM</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.user-ini.cache-ttl" class="link">user_ini.cache_ttl</a></td>
        <td>&quot;300&quot;</td>
        <td>PHP_INI_SYSTEM</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.user-ini.filename" class="link">user_ini.filename</a></td>
        <td>&quot;.user.ini&quot;</td>
        <td>PHP_INI_SYSTEM</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.extension-dir" class="link">extension_dir</a></td>
        <td>&quot;/path/to/php&quot;</td>
        <td>PHP_INI_SYSTEM</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.extension" class="link">extension</a></td>
        <td>NULL</td>
        <td><var class="filename">php.ini</var> only</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.zend-extension" class="link">zend_extension</a></td>
        <td>NULL</td>
        <td><var class="filename">php.ini</var> only</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.cgi.check-shebang-line" class="link">cgi.check_shebang_line</a></td>
        <td>&quot;1&quot;</td>
        <td>PHP_INI_SYSTEM</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.cgi.discard-path" class="link">cgi.discard_path</a></td>
        <td>&quot;0&quot;</td>
        <td>PHP_INI_SYSTEM</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.cgi.fix-pathinfo" class="link">cgi.fix_pathinfo</a></td>
        <td>&quot;1&quot;</td>
        <td>PHP_INI_SYSTEM</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.cgi.force-redirect" class="link">cgi.force_redirect</a></td>
        <td>&quot;1&quot;</td>
        <td>PHP_INI_SYSTEM</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.cgi.nph" class="link">cgi.nph</a></td>
        <td>&quot;0&quot;</td>
        <td>PHP_INI_SYSTEM</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.cgi.redirect-status-env" class="link">cgi.redirect_status_env</a></td>
        <td>NULL</td>
        <td>PHP_INI_SYSTEM</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.cgi.rfc2616-headers" class="link">cgi.rfc2616_headers</a></td>
        <td>&quot;0&quot;</td>
        <td>PHP_INI_ALL</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.fastcgi.impersonate" class="link">fastcgi.impersonate</a></td>
        <td>&quot;0&quot;</td>
        <td>PHP_INI_SYSTEM</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.fastcgi.logging" class="link">fastcgi.logging</a></td>
        <td>&quot;1&quot;</td>
        <td>PHP_INI_SYSTEM</td>
        <td class="empty">&nbsp;</td>
       </tr>

      </tbody>
     
    </table>

   </p>
   
   <p class="para">这是配置指令的简短说明。</p>
   
   <p class="para">
    <dl>
     
      <dt id="ini.include-path">
       <code class="parameter">include_path</code>
       <span class="type">string</span>
      </dt>

      <dd>

       <p class="para">
        Specifies a list of directories where the
        <span class="function"><a href="function.require.html" class="function">require</a></span>, <span class="function"><a href="function.include.html" class="function">include</a></span>,
        <span class="function"><a href="function.fopen.html" class="function">fopen()</a></span>, <span class="function"><a href="function.file.html" class="function">file()</a></span>,
        <span class="function"><a href="function.readfile.html" class="function">readfile()</a></span> and <span class="function"><a href="function.file-get-contents.html" class="function">file_get_contents()</a></span>
        functions look for files.  The format is like the system&#039;s
        <var class="envar">PATH</var> environment variable: a list of directories
        separated with a colon in Unix or semicolon in Windows.
       </p>
       <p class="para">
        PHP considers each entry in the include path separately when looking for
        files to include. It will check the first path, and if it doesn&#039;t find
        it, check the next path, until it either locates the included file or
        returns with an
        <strong><code>E_WARNING</code></strong>
        or an <strong><code>E_ERROR</code></strong>. 
        You may modify or set your include path at runtime using
        <span class="function"><a href="function.set-include-path.html" class="function">set_include_path()</a></span>.
       </p>
       <p class="para">
        <div class="example" id="example-5515">
         <p><strong>示例 #1 Unix include_path</strong></p>
         <div class="example-contents">
<div class="php.inicode"><pre class="php.inicode">include_path=&quot;.:/php/includes&quot;</pre>
</div>
         </div>

        </div>
       </p>
       <p class="para">
        <div class="example" id="example-5516">
         <p><strong>示例 #2 Windows include_path</strong></p>
         <div class="example-contents">
<div class="php.inicode"><pre class="php.inicode">include_path=&quot;.;c:\php\includes&quot;</pre>
</div>
         </div>

        </div>
       </p>
       <p class="para">
        Using a <code class="literal">.</code> in the include path allows for
        relative includes as it means the current directory.  However,
        it is more efficient to explicitly use <code class="literal">include
        &#039;./file&#039;</code> than having PHP always check the current
        directory for every include.
       </p>
       <blockquote class="note"><p><strong class="note">注意</strong>: 
        <p class="para">
         <code class="literal">ENV</code> variables are also accessible in .ini files.
         As such it is possible to reference the home directory using
         <code class="literal">${LOGIN}</code> and <code class="literal">${USER}</code>.
        </p>
        <p class="para">
         Environment variables may vary between Server APIs as those environments
         may be different.
        </p>       
       </p></blockquote>
       <p class="para">
        <div class="example" id="example-5517">
         <p><strong>示例 #3 Unix include_path using ${USER} env variable</strong></p>
         <div class="example-contents">
<div class="php.inicode"><pre class="php.inicode">include_path = &quot;.:${USER}/pear/php&quot;</pre>
</div>
         </div>

        </div>
       </p>
      </dd>

     
     
     
      <dt id="ini.open-basedir">
       <code class="parameter">open_basedir</code>
       <span class="type">string</span>
      </dt>

      <dd>

       <p class="para">
        Limit the files that can be accessed by PHP to the specified
        directory-tree, including the file itself.  This directive 
        is <em class="emphasis">NOT</em> affected by whether Safe Mode is 
        turned On or Off.
       </p>
       <p class="para">
        When a script tries to access the filesystem, for example using 
        <span class="function"><a href="function.include.html" class="function">include</a></span>, or <span class="function"><a href="function.fopen.html" class="function">fopen()</a></span>, the location of the file 
        is checked.
        When the file is outside the specified directory-tree, PHP will refuse to access it. 
        All symbolic links are resolved, so it&#039;s not possible to avoid this restriction
        with a symlink. If the file doesn&#039;t exist then the symlink couldn&#039;t be
        resolved and the filename is compared to (a resolved) <strong class="option unknown">open_basedir</strong>.
       </p>
       <p class="para">
        <strong class="option unknown">open_basedir</strong> can affect more than just filesystem functions; for example 
        if <code class="literal">MySQL</code> is configured to use <code class="literal">mysqlnd</code> drivers,
        <code class="literal">LOAD DATA INFILE</code> will be affected by <strong class="option unknown">open_basedir</strong>.
        Much of the extended functionality of PHP uses <code class="literal">open_basedir</code> in this way.
       </p>
       <p class="para">
        The special value <code class="systemitem systemitem">.</code>
        indicates that the working directory of the script will be used as the
        base-directory. This is, however, a little dangerous as the working directory
        of the script can easily be changed with <span class="function"><a href="function.chdir.html" class="function">chdir()</a></span>.
       </p>
       <p class="para">
        In <var class="filename">httpd.conf</var>, <strong class="option unknown">open_basedir</strong> can be turned off
        (e.g. for some virtual hosts)
        <a href="configuration.changes.html#configuration.changes.apache" class="link">the same way</a> as
        any other configuration directive with &quot;<code class="literal">php_admin_value open_basedir
        none</code>&quot;.
       </p>
       <p class="para">
        Under Windows, separate the directories with a semicolon. On all
        other systems, separate the directories with a colon. As an Apache
        module, <strong class="option unknown">open_basedir</strong> paths from parent directories are now
        automatically inherited.
       </p>
       <p class="para">
        The restriction specified with <strong class="option unknown">open_basedir</strong> is a
        directory name, not a prefix.
       </p>
       <p class="para">
        The default is to allow all files to be opened.
       </p>
       <blockquote class="note"><p><strong class="note">注意</strong>: 
        <p class="para">
         open_basedir can be tightened at run-time. This means
         that if open_basedir is set to <code class="literal">/www/</code> in <var class="filename">php.ini</var>
         a script can tighten the configuration to
         <code class="literal">/www/tmp/</code> at run-time with
         <span class="function"><a href="function.ini-set.html" class="function">ini_set()</a></span>. When listing several directories, you
         can use the <strong><code>PATH_SEPARATOR</code></strong> constant as a separator
         regardless of the operating system.
        </p>
       </p></blockquote>
       <blockquote class="note"><p><strong class="note">注意</strong>: 
        <p class="para">
         Using open_basedir will set <a href="ini.core.html#ini.realpath-cache-size" class="link">realpath_cache_size</a>
         to <code class="literal">0</code> and thus <em class="emphasis">disable</em> the realpath cache.
        </p>
       </p></blockquote>
       <div class="caution"><strong class="caution">警告</strong>
        <p class="para">
         <code class="literal">open_basedir</code> 只是额外的安全保障，并不全面，因此在需要安全性时并不能依赖。
        </p>
       </div>
      </dd>

     
     
     
      <dt id="ini.doc-root">
       <code class="parameter">doc_root</code>
       <span class="type">string</span>
      </dt>

      <dd>

       <p class="para">
        PHP&#039;s &quot;root directory&quot; on the server. Only used if
        non-empty. 
        If PHP was not compiled with FORCE_REDIRECT, you <em class="emphasis">should
        </em> set doc_root if you are running PHP as a CGI under any web
        server (other than IIS). The alternative is to use the
        <a href="ini.core.html#ini.cgi.force-redirect" class="link">
         cgi.force_redirect</a> configuration below.
       </p>
      </dd>

     
     
     
      <dt id="ini.user-ini.cache-ttl">
       <code class="parameter">user_ini.cache_ttl</code>
       <span class="type">int</span>
      </dt>

      <dd>

       <p class="para">
       </p>
      </dd>

     
     
     
      <dt id="ini.user-ini.filename">
       <code class="parameter">user_ini.filename</code>
       <span class="type">string</span>
      </dt>

      <dd>

       <p class="para">
       </p>
      </dd>

     
     
     
      <dt id="ini.user-dir">
       <code class="parameter">user_dir</code>
       <span class="type">string</span>
      </dt>

      <dd>

       <p class="para">
        The base name of the directory used on a user&#039;s home directory for PHP
        files, for example <var class="filename">public_html
        </var>.
       </p>
      </dd>

     
     
     
      <dt id="ini.extension-dir">
       <code class="parameter">extension_dir</code>
       <span class="type">string</span>
      </dt>

      <dd>

       <p class="para">
        PHP 寻找可动态加载扩展的目录。建议指定绝对路径。参阅 <a href="info.configuration.html#ini.enable-dl" class="link">enable_dl</a>
        和 <span class="function"><a href="function.dl.html" class="function">dl()</a></span>。
       </p>
      </dd>

     
     
     
      <dt id="ini.extension">
       <code class="parameter">extension</code>
       <span class="type">string</span>
      </dt>

      <dd>

       <p class="para">
        Which dynamically loadable extensions to load when PHP starts up.
       </p>
      </dd>

     
     
     
      <dt id="ini.zend-extension">
       <code class="parameter">zend_extension</code>
       <span class="type">string</span>
      </dt>

      <dd>

       <p class="para">
        Name of dynamically loadable Zend extension (for example
        XDebug) to load when PHP starts up.
       </p>
      </dd>

     
     
     
      <dt id="ini.cgi.check-shebang-line">
       <code class="parameter">cgi.check_shebang_line</code>
       <span class="type">bool</span>
      </dt>

      <dd>

       <p class="para">
        Controls whether <abbr title="Common Gateway Interface">CGI</abbr> PHP checks for line starting
        with <code class="literal">#!</code> (shebang) at the top of the running script.
        This line might be needed if the script support running both as
        stand-alone script and via PHP <abbr title="Common Gateway Interface">CGI</abbr>. PHP in
        <abbr title="Common Gateway Interface">CGI</abbr> mode skips this line and ignores its content if
        this directive is turned on.
       </p>
      </dd>

     
     
     
      <dt id="ini.cgi.discard-path">
       <code class="parameter">cgi.discard_path</code>
       <span class="type">bool</span>
      </dt>

      <dd>

       <p class="para">
        If this is enabled, the PHP CGI binary can safely be placed outside of
        the web tree and people will not be able to circumvent .htaccess security.
       </p>
      </dd>

     
     
     
      <dt id="ini.cgi.fix-pathinfo">
       <code class="parameter">cgi.fix_pathinfo</code>
       <span class="type">bool</span>
      </dt>

      <dd>

       <p class="para">
        Provides <em class="emphasis">real</em> <code class="literal">PATH_INFO</code>/
        <code class="literal">PATH_TRANSLATED</code> support for <abbr title="Common Gateway Interface">CGI</abbr>.
        PHP&#039;s previous behaviour was to set <code class="literal">PATH_TRANSLATED</code>
        to <code class="literal">SCRIPT_FILENAME</code>, and to not grok what <code class="literal">
        PATH_INFO</code> is. For more information on
        <code class="literal">PATH_INFO</code>, see the <abbr title="Common Gateway Interface">CGI</abbr> specs.
        Setting this to <code class="literal">1</code> will cause PHP
        <abbr title="Common Gateway Interface">CGI</abbr> to fix its paths to conform to the spec. A
        setting of zero causes PHP to behave as before. It is turned on by
        default. You should fix your scripts to use
        <code class="literal">SCRIPT_FILENAME</code> rather than
        <code class="literal">PATH_TRANSLATED</code>.
       </p>
      </dd>

     
     
     
      <dt id="ini.cgi.force-redirect">
       <code class="parameter">cgi.force_redirect</code>
       <span class="type">bool</span>
      </dt>

      <dd>

       <p class="para">
        cgi.force_redirect is necessary to provide security running PHP as a
        <abbr title="Common Gateway Interface">CGI</abbr> under most web servers. Left undefined, PHP
        turns this on by default. You can turn it off <em class="emphasis">at your own
        risk</em>.
       </p>
       <blockquote class="note"><p><strong class="note">注意</strong>: 
        <p class="para">
         Windows Users: When using IIS this option <em class="emphasis">must</em>
         be turned off. For OmniHTTPD or Xitami the same applies.
        </p>
       </p></blockquote>
      </dd>

     
     
     
      <dt id="ini.cgi.nph">
       <code class="parameter">cgi.nph</code>
       <span class="type">bool</span>
      </dt>

      <dd>

       <p class="para">
        If cgi.nph is enabled it will force cgi to always sent Status: 200 with
        every request.
        </p>
      </dd>

     
     
     
      <dt id="ini.cgi.redirect-status-env">
       <code class="parameter">cgi.redirect_status_env</code>
       <span class="type">string</span>
      </dt>

      <dd>

       <p class="para">
        If cgi.force_redirect is turned on, and you are not running under
        Apache or Netscape (iPlanet) web servers, you <em class="emphasis">may</em>
        need to set an environment variable name that PHP will look for to
        know it is OK to continue execution.
       </p>
       <blockquote class="note"><p><strong class="note">注意</strong>: 
        <p class="para">
         Setting this variable <em class="emphasis">may</em> cause security issues,
         <em class="emphasis">know what you are doing first</em>.
        </p>
       </p></blockquote>
      </dd>

     
     
     
      <dt id="ini.cgi.rfc2616-headers">
       <code class="parameter">cgi.rfc2616_headers</code>
       <span class="type">int</span>
      </dt>

      <dd>

      <p class="para">
        Tells PHP what type of headers to use when sending HTTP response
        code. If it&#039;s set to 0, PHP sends a <a href="http://www.faqs.org/rfcs/rfc3875" class="link external">&raquo;&nbsp;RFC 3875</a> 
        &quot;Status:&quot; header that is supported by Apache and other web servers. When this option 
        is set to 1, PHP will send <a href="http://www.faqs.org/rfcs/rfc2616" class="link external">&raquo;&nbsp;RFC 2616</a> compliant
        headers.  
       </p>
       <p class="para">
        If this option is enabled, and you are running PHP in a CGI environment (e.g. PHP-FPM)
        you should not use standard RFC 2616 style HTTP status response headers, you should 
        instead use their RFC 3875 equivalent e.g. instead of header(&quot;HTTP/1.0 404 Not found&quot;); 
        you should use header(&quot;Status: 404 Not Found&quot;);
       </p>
       <p class="para">
        Leave it set to 0 unless you know what you&#039;re doing.
       </p>
      </dd>

     
     
     
      <dt id="ini.fastcgi.impersonate">
       <code class="parameter">fastcgi.impersonate</code>
       <span class="type">string</span>
      </dt>

      <dd>

       <p class="para">
        FastCGI under IIS (on WINNT based OS) supports the ability to impersonate
        security tokens of the calling client. This allows IIS to define the
        security context that the request runs under. mod_fastcgi under Apache
        does not currently support this feature (03/17/2002)
        Set to 1 if running under IIS. Default is zero.
       </p>
      </dd>

     
     
     
      <dt id="ini.fastcgi.logging">
       <code class="parameter">fastcgi.logging</code>
       <span class="type">bool</span>
      </dt>

      <dd>

       <p class="para">
        Turns on SAPI logging when using FastCGI. Default is 
        to enable logging.
       </p>
      </dd>

     
     
    </dl>

   </p>
  </div>
  
  <div class="section" id="ini.sect.file-uploads">
   <h2 class="title">File Uploads</h2>
   <p class="para">
    <table class="doctable table">
     <caption><strong>File Uploads Configuration Options</strong></caption>
     
      <thead>
       <tr>
        <th>名字</th>
        <th>默认</th>
        <th>可修改范围</th>
        <th>更新日志</th>
       </tr>

      </thead>

      <tbody class="tbody">
       <tr>
        <td><a href="ini.core.html#ini.file-uploads" class="link">file_uploads</a></td>
        <td>&quot;1&quot;</td>
        <td>PHP_INI_SYSTEM</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.upload-tmp-dir" class="link">upload_tmp_dir</a></td>
        <td>NULL</td>
        <td>PHP_INI_SYSTEM</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="info.configuration.html#ini.max-input-nesting-level" class="link">max_input_nesting_level</a></td>
        <td>64</td>
        <td>PHP_INI_PERDIR</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="info.configuration.html#ini.max-input-vars" class="link">max_input_vars</a></td>
        <td>1000</td>
        <td>PHP_INI_PERDIR</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.upload-max-filesize" class="link">upload_max_filesize</a></td>
        <td>&quot;2M&quot;</td>
        <td>PHP_INI_PERDIR</td>
        <td class="empty">&nbsp;</td>
       </tr>

       <tr>
        <td><a href="ini.core.html#ini.max-file-uploads" class="link">max_file_uploads</a></td>
        <td>20</td>
        <td>PHP_INI_PERDIR</td>
        <td class="empty">&nbsp;</td>
       </tr>

      </tbody>
     
    </table>

   </p>
   
   <p class="para">这是配置指令的简短说明。</p>
   
   <p class="para">
    <dl>
     
      <dt id="ini.file-uploads">
       <code class="parameter">file_uploads</code>
       <span class="type">bool</span>
      </dt>

      <dd>

       <p class="para">
        Whether or not to allow HTTP
        <a href="features.file-upload.html" class="link">file uploads</a>. See also the
        <a href="ini.core.html#ini.upload-max-filesize" class="link">upload_max_filesize</a>,
        <a href="ini.core.html#ini.upload-tmp-dir" class="link">upload_tmp_dir</a>, and
        <a href="ini.core.html#ini.post-max-size" class="link">post_max_size</a> directives.
       </p>
      </dd>

     
     
     
      <dt id="ini.upload-tmp-dir">
       <code class="parameter">upload_tmp_dir</code>
       <span class="type">string</span>
      </dt>

      <dd>

       <p class="para">
        The temporary directory used for storing files when doing
        file upload. Must be writable by whatever user PHP
        is running as. If not specified PHP will use the system&#039;s default.
       </p>
       <p class="para">
        If the directory specified here is not writable, PHP falls back to 
        the system default temporary directory. If 
        <a href="ini.core.html#ini.open-basedir" class="link">open_basedir</a> is on, then 
        the system default directory must be allowed for an upload to 
        succeed.
       </p>
      </dd>

     
     
     
      <dt id="ini.upload-max-filesize">
       <code class="parameter">upload_max_filesize</code>
       <span class="type">int</span>
      </dt>

      <dd>

       <p class="para">
        上传文件的最大大小。
       </p>
       <p class="para">
        <a href="ini.core.html#ini.post-max-size" class="link">post_max_size</a> 必须大于此值。
       </p>
       
       <span class="simpara">当使用 <span class="type">int</span>
时, 其值以字节来衡量。还可以使用在 <a href="faq.using.html#faq.using.shorthandbytes" class="link">FAQ</a> 中描述的速记符。</span>
       
      </dd>

     
     
     
      <dt id="ini.max-file-uploads">
       <code class="parameter">max_file_uploads</code>
       <span class="type">int</span>
      </dt>

      <dd>

       <p class="para">
        允许同时上传的最大文件数。提交时留空的上传字段不计入此限制。
       </p>
      </dd>

     
    </dl>

   </p>
  </div>
  
  <div class="section" id="ini.sect.sql-general">
   <h2 class="title">General SQL</h2>
   <p class="para">
    <table class="doctable table">
     <caption><strong>General SQL Configuration Options</strong></caption>
     
      <thead>
       <tr>
        <th>名字</th>
        <th>默认</th>
        <th>可修改范围</th>
        <th>更新日志</th>
       </tr>

      </thead>

      <tbody class="tbody">
       <tr>
        <td><a href="ini.core.html#ini.sql.safe-mode" class="link">sql.safe_mode</a></td>
        <td>&quot;0&quot;</td>
        <td>PHP_INI_SYSTEM</td>
        <td>Removed as of PHP 7.2.0</td>
       </tr>

      </tbody>
     
    </table>

   </p>
   
   <p class="para">这是配置指令的简短说明。</p>
   
   <p class="para">
    <dl>
     
      <dt id="ini.sql.safe-mode">
       <code class="parameter">sql.safe_mode</code>
       <span class="type">bool</span>
      </dt>

      <dd>

       <p class="para">
        If turned on, database connection functions that specify default values
        will use those values in place of any user-supplied arguments. For details
        on the default values, see the documentation for the relevant connection
        functions.
       </p>
       <div class="warning"><strong class="warning">警告</strong>
        <p class="simpara">
         This feature has been <em class="emphasis">REMOVED</em> as of PHP 7.2.0.
        </p>
       </div>
      </dd>

     
    </dl>

   </p>
  </div>
  
  <div class="section" id="ini.sect.windows">
   <h2 class="title">Windows Specific</h2>
   <p class="para">
    <table class="doctable table">
     <caption><strong>Windows Specific Configuration Options</strong></caption>
     
      <thead>
       <tr>
        <th>名字</th>
        <th>默认</th>
        <th>可修改范围</th>
        <th>更新日志</th>
       </tr>

      </thead>

      <tbody class="tbody">
       <tr>
        <td><a href="ini.core.html#ini.windows-show-crt-warning" class="link">windows.show_crt_warning</a></td>
        <td>&quot;0&quot;</td>
        <td>PHP_INI_ALL</td>
        <td class="empty">&nbsp;</td>
       </tr>

      </tbody>
     
    </table>

   </p>
   
   <p class="para">这是配置指令的简短说明。</p>
   
   <p class="para">
    <dl>
     
      <dt id="ini.windows-show-crt-warning">
       <code class="parameter">windows.show_crt_warning</code>
       <span class="type">bool</span>
      </dt>

      <dd>

       <p class="para">
        This directive shows the Windows CRT warnings when enabled.
       </p>
      </dd>

     
    </dl>

   </p>
  </div>
  
 </div></div></div></body></html>